<template>
    <form>
        <table>
            <h2>新增书籍</h2>
            <tbody>
                <tr>
                    <td>书名</td>
                    <td><input type="text" placeholder="请输入书名"></td>
                </tr>
                <tr>
                    <td>作者</td>
                    <td><input type="text" placeholder="请输入作者"></td>
                </tr>
                <tr>
                    <td>简介</td>
                    <td><input type="text" placeholder="请输入简介"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" @click="btnSave"></td>
                    <td><input type="button" value="取消" @click="btnCancel"></td>
                </tr>
            </tbody>
        </table>
    </form>
</template>
<script setup>
import { useRouter} from 'vue-router';

let router = useRouter()

function btnSave(){
    console.log('保存');
    router.push('/book')
    
}
function btnCancel(){
    console.log('取消');
    router.push('/book')
    
}
</script>